body {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/yh/bj.jpg');
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}
.conten {
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: mofang 5s infinite linear;
    transform: translate(-50%, -50%);
    margin: 0 auto;
    margin-top: 250px;
}

.box {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid #fd0101;
    background-size: cover;
}

.front {
    transform: translateZ(100px);
    background-image: url(../img/魔方/魔方白.jpg);
}

.back {
    transform: rotateY(180deg) translateZ(100px);
    background-image: url(../img/魔方/魔方蓝.jpg);
}

.left {
    transform: rotateY(-90deg) translateZ(100px);
    background-image: url(../img/魔方/魔方绿.jpg);
}

.right {
    transform: rotateY(90deg) translateZ(100px);
    background-image: url(../img/魔方/魔方黄.jpg);
}

.top {
    transform: rotateX(90deg) translateZ(100px);
    background-image: url(../img/魔方/魔方橙.jpg);
}

.bottom {
    transform: rotateX(-90deg) translateZ(100px);
    background-image: url(../img/魔方/魔方红.jpg);
}

@keyframes mofang {
    0% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: perspective(1000px) rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}